package io.github.wslxm.springbootplus2.starter.websocket.util;

import io.github.wslxm.springbootplus2.starter.redis.util.RedisUtil;
import io.github.wslxm.springbootplus2.starter.websocket.constant.WebsocketConst;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class WebsocketUtil {

    @Autowired
    private RedisUtil redisUtil;

    /**
     * 获取缓存 key
     * @return
     */
    public String getCacheKey() {
        String websocketCacheKey = WebsocketConst.WEBSOCKET_CACHE_KEY;
        return redisUtil.getPrefix() + websocketCacheKey;
    }
}
